Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

welcome back qr login #2060

Merged
merged 1 commit into from
Jan 8, 2025
Merged

welcome back qr login #2060

merged 1 commit into from
Jan 8, 2025

Conversation

qhy040404
Copy link
Member

@qhy040404 qhy040404 commented Oct 18, 2024

DO NOT MERGE BEFORE HYP ENABLE THIS

Description

Related Issue

Checklist

  • The target PR branch is develop branch

@qhy040404 qhy040404 requested a review from Lightczx October 18, 2024 06:16
@qhy040404 qhy040404 marked this pull request as draft October 18, 2024 10:13
@Lightczx Lightczx linked an issue Oct 22, 2024 that may be closed by this pull request
@qhy040404 qhy040404 marked this pull request as ready for review January 7, 2025 14:58
@Copilot Copilot bot review requested due to automatic review settings January 7, 2025 14:58
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 5 out of 15 changed files in this pull request and generated 1 comment.

Files not reviewed (10)
  • src/Snap.Hutao/Snap.Hutao/ApiEndpoints.csv: Language not supported
  • src/Snap.Hutao/Snap.Hutao/UI/Xaml/View/UserView.xaml: Language not supported
  • src/Snap.Hutao/Snap.Hutao/Web/Hoyolab/Passport/QrTicketWrapper.cs: Evaluated as low risk
  • src/Snap.Hutao/Snap.Hutao/Web/Hoyolab/Passport/HoyoPlayPassportClientOversea.cs: Evaluated as low risk
  • src/Snap.Hutao/Snap.Hutao/Web/Hoyolab/Passport/IHoyoPlayPassportClient.cs: Evaluated as low risk
  • src/Snap.Hutao/Snap.Hutao/Web/Request/Builder/EmptyContent.cs: Evaluated as low risk
  • src/Snap.Hutao/Snap.Hutao/ViewModel/User/UserViewModel.cs: Evaluated as low risk
  • src/Snap.Hutao/Snap.Hutao/UI/Xaml/View/Dialog/UserQRCodeDialog.xaml.cs: Evaluated as low risk
  • src/Snap.Hutao/Snap.Hutao/Web/Response/KnownReturnCode.cs: Evaluated as low risk
  • src/Snap.Hutao/Snap.Hutao/Web/Hoyolab/Passport/HoyoPlayPassportClient.cs: Evaluated as low risk
Comments suppressed due to low confidence (1)

src/Snap.Hutao/Snap.Hutao/Web/Hoyolab/Passport/QrLoginResult.cs:33

  • The property name NeedRealperson should be corrected to NeedRealPerson.
public bool NeedRealperson { get; set; }

SortedDictionary<string, string> cookieMap = new()
{
[STUID] = qrLoginResult.UserInfo.Aid,
[STOKEN] = qrLoginResult.Tokens.Single(token => token.TokenType is 1).Token,
Copy link
Preview

Copilot AI Jan 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using Single to get the token might throw an exception if there are multiple tokens of type 1. Ensure there is exactly one token of type 1 or handle multiple tokens gracefully.

Suggested change
[STOKEN] = qrLoginResult.Tokens.Single(token => token.TokenType is 1).Token,
[STOKEN] = qrLoginResult.Tokens.FirstOrDefault(token => token.TokenType is 1)?.Token,

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
@Lightczx Lightczx merged commit e29d11e into develop Jan 8, 2025
3 checks passed
@Lightczx Lightczx deleted the feat/qr branch January 10, 2025 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feat]: 增加登陆方式
2 participants